var entityCollection = require('../../../Base/server/controllers/EntityCollection');

//根据终端设备UniqueID查找工位对应的工位作业集合
exports.getContainerById = function(id, completeFun) {
    var entity = entityCollection.getEntity("Container");
    entity.findOne({ _id: id }, null, function(err, record) {
        if (err) {
            var newErr = new Error();
            newErr.leval = 9;
            newErr.title = '查询终端错误';
            newErr.message = '请检查查询参数！';
            completeFun(newErr);
        } else {
            completeFun(null, record);
        }
    });
};
